#!/bin/bash

# 情绪分析服务启动脚本

echo "启动情绪分析服务..."

# 检查Python环境
if ! command -v python3 &> /dev/null; then
    echo "错误: 未找到Python3，请先安装Python3"
    exit 1
fi

# 检查依赖
echo "检查依赖..."
pip3 install snownlp flask flask-cors

# 启动服务
echo "启动情绪分析服务在端口5001..."
cd "$(dirname "$0")"
python3 emotion_service.py
